package main

import (
	"huaxrobot/config"
	"huaxrobot/router"
	"huaxrobot/models"
	"huaxrobot/tools"	
	//"huaxrobot/services"
)

func main() {
	// 从配置文件读取配置
	config.Init()
	//初始化数据库
	models.InitDB()
	//初始化kafka客户端
    tools.InitKafka()
	//启动结果收集任务
	//go services.CollectResult()
	// 装载路由
	r := server.NewRouter()
	//读取配置文件
	port := config.CONFIG.GetString("server.port")
	address := ":" + port
	r.Run(address)
}